package jdbc.three.mapper;

import jdbc.three.beans.Account;
import jdbc.three.util.tmp.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class AccountMapper implements RowMapper<Account> {
    @Override
    public Account mapRow(ResultSet rs) throws SQLException {
        return new Account(rs.getInt("id"),rs.getString("name"),rs.getDouble("money"));
    }
}
